<!DOCTYPE html>
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta charset="UTF-8">
<title>greatwall</title>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<link rel="stylesheet" href="assets/libs/layui/css/layui.css"/>
<link rel="stylesheet" href="assets/css/admin.css"/>
<link rel="stylesheet" href="module/formSelects/formSelects-v4.css"/>
<link rel="stylesheet" href="assets/libs/zTree/css/metroStyle/metroStyle.css"/>
<!-- 自定义主题，使用EasyWeb主题生成器生成 -->
<!--<link rel="stylesheet" href="assets/css/theme-blue.css"/>-->
</head>
<body class="layui-layout-body">
<div class="layui-layout layui-layout-admin">
    <!-- 头部 存放用户登录信息-->
    <div class="layui-header" p-com="header"></div>
    
    <!-- 左边菜单栏 关联 config.js  index.js side.html -->
    <div class="layui-side" p-com="side"></div>
    
    <!-- 主体部分 -->
    <div class="layui-body">
        <div class="layui-tab" lay-allowClose="true" lay-filter="admin-pagetabs">
            <ul class="layui-tab-title">
            </ul>
            <div class="layui-tab-content">
            </div>
        </div>
        <div class="layui-icon admin-tabs-control layui-icon-prev" ew-event="leftPage"></div>
        <div class="layui-icon admin-tabs-control layui-icon-next" ew-event="rightPage"></div>
        <div class="layui-icon admin-tabs-control layui-icon-down">
            <ul class="layui-nav admin-tabs-select" lay-filter="admin-pagetabs-nav">
                <li class="layui-nav-item" lay-unselect>
                    <a href="javascript:"></a>
                    <dl class="layui-nav-child layui-anim-fadein">
                        <dd ew-event="closeThisTabs" lay-unselect><a href="javascript:">关闭当前标签页</a></dd>
                        <dd ew-event="closeOtherTabs" lay-unselect><a href="javascript:">关闭其它标签页</a></dd>
                        <dd ew-event="closeAllTabs" lay-unselect><a href="javascript:">关闭全部标签页</a></dd>
                    </dl>
                </li>
            </ul>
        </div>
    </div>
    
    <!-- 底部 -->
    <div class="layui-footer">powered by greatwall herw @2022</div>
    
    <!-- 手机屏幕遮罩层 -->
    <div class="site-mobile-shade"></div>
</div>
<script type="text/javascript" src="module/apiUrl.js"></script>
<script type="text/javascript" src="assets/libs/jquery-3.2.1.min.js"></script>
<script type="text/javascript" src="assets/libs/q.js"></script>
<script type="text/javascript" src="assets/libs/pandyle.min.js"></script>
<script type="text/javascript" src="assets/libs/layui/layui.js"></script>
<script type="text/javascript" src="assets/libs/zTree/js/jquery.ztree.all-3.5.min.js"></script>
<script>
layui.config({
    base: 'module/'
}).extend({
    formSelects: 'formSelects/formSelects-v4',
    treetable: 'treetable-lay/treetable'
}).use(['config', 'index', 'element'], function () {
    let config = layui.config;
    let index = layui.index;
    let element = layui.element;

    // 检查是否登录
    if (!config.getToken() || config.getToken() == '') {
        location.replace('login.html');
        return;
    }

    // 检查多标签功能是否开启
    index.checkPageTabs();

    // 获取当前用户信息
    index.getUser(function (user) {
        $('.layui-layout-admin .layui-header').vm(user);
        index.initLeftNav();
        element.render('nav');
        index.initRouter();
        index.bindEvent();
    });
});
</script>
</body>
</html>